@import "../common/variables";

.@{css-prefix} {
  &-switch {
    position: relative;
    z-index: 10;
    display: block;
    width: 52px;
    height: 32px;
    left: 0;
    border: 1px solid #DFDFDF;
    border-radius: 16px;
    background-color: #DFDFDF;
    -webkit-appearance: none;
    -moz-appearance: none;
    &:before, &:after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      height: 30px;
      border-radius: 15px;
      transition: transform .3s;
    }
    &:before {
      width: 50px;
      background-color: #FDFDFD;
    }
    &:after {
      width: 30px;
      background-color: #FFF;
      box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    }
    &:checked {
      border-color: currentColor;
      background-color: currentColor;
      &:before {
        transform: scale(0);
      }
      &:after {
        transform: translateX(20px);
      }
    }
    &[disabled] {
      opacity: 0.5;
    }
  }
}
